*/* $Header: dsp.hs,v 2.2 01/10/02 10:30:18 przybyls Exp $ */

    nolist

***********************************************************************/
* INCLUDE FILE NAME: dsp.hs                                           */
* ==================                                                  */
*                                                                     */
* COMMENT: This include file contains symbolic constants for the      */
*          DSP assembly routines.                                     */
*                                                                     */
*                                                                     */
*                                                                     */
***********************************************************************/

*****************************/
*   IFDEFS                  */
*****************************/


*****************************/
*   SYMBOLIC CONSTANTS      */
*****************************/


***************************************************************************/
*
*    This section documents the error codes generated by the Detector DSP.
*    The lower nibble of the status word consists of a flag and 3 non-fatal
*    errors.  More than one bit may be set if more than one error occurs.
*    These errors will clear themselves when the cause is corrected.
*    The upper nibble represents the fatal errors.  Only the first fatal
*    error encountered is trapped.  These errors can only be cleared by
*    resetting and re-booting the DSP.
*
*            bit #:  7    6    5    4    3    2    1    0
*                    |              |    |    |    |    |
*                    |------\/------|    |    |    |    |-- Data Available
*                           ||           |    |    |-- Input Buffer Not Filled
*                           ||           |    |-- Output Buffer Not Read
*                           ||           |-- Input Buffer Checksum Error
*                           ||
*                    0  0  0  0  =  No Fatal Errors - OK
*
*                    0  0  0  1  =  Task_1K didn't finish before next call
*                    0  0  1  0  =  Task_100 didn't finish before next call
*                    0  0  1  1  =  Task_100 called before data was available
*
*                    1  0  0  1  =  ROM Checksum Error
*                    1  0  1  0  =  RAM Test Error
*                    1  0  1  1  =  Register Test Error
*
*    The RAM and Register Test fatal errors can only be generated by the
*    first boot page of the DSP.  The ROM Checksum error can be generated
*    by either page at start-up of that page.  The Task_ errors are generated
*    by the second boot page operation and should not occur (except maybe
*    during debug).
*/

* The following are considered NON FATAL events */
DATA_AVAILABLE           equ       $01
BUFFER_NOT_FILLED        equ       $02
BUFFER_NOT_READ          equ       $04
INPUT_CHECKSUM_FAIL      equ       $08


* The following are considered FATAL events */
TASK_1K_FAIL             equ       $10
TASK_100_FAIL            equ       $20
TASK_100_EARLY           equ       $30
ROM_FAIL                 equ       $90
RAM_FAIL                 equ       $A0
REGISTER_FAIL            equ       $B0


* This is retured when the DSP fails its first boot page diagnostic test
*  and returns garbage, i.e. the code does not match any of the allowable
*  codes for this test.
*/
SIG_DSP_DEAD             equ       $FF
***************************************************************************/


*****************************/
*   MACROS                  */
*****************************/

   list
